import BaseService from "../BaseService";

class UcDictTypeService extends BaseService {
  // 列表分页查询
  queryPage(params) {
    return this.getAction(this.getModulePath() + `/queryPage`, params);
  }
  //冻结、解冻
  freeze(params) {
    return this.postAction(this.getModulePath() + `/freeze`, params);
  }
  deleteById(params) {
    return this.getAction(this.getModulePath() + `/delectById`, params);
  }
  queryById(params) {
    return this.getAction(this.getModulePath() + `/queryById`, params);
  }
  save(params) {
    return this.postAction(this.getModulePath() + `/save`, params);
  }

  queryByNodeKey(params) {
    return this.getAction(`/publics/dictextend/queryByNodeKey`, params);
  }

  /**
   * 描述:获取host地址
   * @returns {string}
   */
  getBaseUrl() {
    return this.serviceConfig.getBaseUrl("oauth");
  }
  /**
   * 描述:获取模块地址
   * @returns {string}
   */
  getModulePath() {
    return "/publics/dictType";
  }
}

export default new UcDictTypeService();
